﻿<?xml version="1.0" encoding="utf-8" ?>
<Rules>
  <!-- all of the actions classes that can be called -->
  <Handlers>
    <Handler id="ForceExplicitSecurity" class="ForceExplicitSecurity" />
  </Handlers>

  <!-- all of the individual actions to be done -->
  <Actions>
    <Action id="SitesCannotInheritSecurity" handler="ForceExplicitSecurity" scope="Site,RootWebOnly,NonRootWebs,Web" enabled="false">
      <Description>Ensures that no web inherits permissions as it is a rule that all webs must have explicit permissions</Description>
      <Parameters>
        <Parameter key="keyName" value="keyValue" />
      </Parameters>
      <Filters applyAs="listed|includefirst|excludefirst" includeHiddenItems="false">
        <Include property="ID|name|internalname|url|title" match="sometext" matchtype="exact|wildcard|regex" />
        <Exclude property="ID|name|internalname|url|title" match="sometext" matchtype="exact|wildcard|regex" />
      </Filters>
    </Action>
  </Actions>
  
  <Rule id="CommonSettings">
    <Messages>
      <!-- 
        Parameters in messages need to be formatted below like %Site:Url%. Here are the valid items: 
          Site:Url - the full url to the site collection
          Site:Title - the title of the site collection
          
          Web:Url - the full Url to the web being processed
          Web:Path - the relative Url to the web being processed
          Web:Title - the title of the web being processed
      -->
      <Evaluation>
        <Success>Validation Passed</Success>
        <Ignore>This validation is ignoring the specified item</Ignore>
        <Fail>The validation failed</Fail>
      </Evaluation>
      <Repair>
        <Success>Item repaired successfully</Success>
        <Fail>Item could not be repaired successfully</Fail>
      </Repair>
    </Messages>
  </Rule>
  
  <Rule id="SitesCannotInheritSecurity" class="ForceExplicitSecurity" scope="Site,RootWebOnly,NonRootWebs,Web" enabled="false">
    <Parameters>
      <Parameter key="keyName" value="keyValue" />
    </Parameters>
    <Filters applyAs="listed|includefirst|excludefirst" includeHiddenItems="false">
      <Include property="ID|name|internalname|url|title" match="sometext" matchtype="exact|wildcard|regex" />
      <Exclude property="ID|name|internalname|url|title" match="sometext" matchtype="exact|wildcard|regex" />
    </Filters>
  </Rule>
</Rules>
